import { set, merge } from 'lodash'
export default {
  changeVueKey(state, v) {
    state.vueKey++
  },
  setDataSet(state, v) {
    state.dataSet = merge({}, v)
  },
  UPDATE_DATASET(state, v) {
    if (v.key && v.val) {
      set(state.dataSet, v.key, v.val)
    }
  },
  UPDATE_DATASET_OBJ(state, v) {
    state.dataSet = v
  },
  setTokenId(state, v) {
    state.tokenId = v
  },
  changeFocusId(state, payload) {
    state.focusId = payload
  },
  changeFocusStyle(state, payload) {
    state.focusStyle = payload
  }
}
